#include<Servo.h>


Servo MainServo;

void setup() {
  // put your setup code here, to run once:
  InitCar();
}

void loop() {
  // put your main code here, to run repeatedly:
  
  
}

void InitCar()
{
  MainServo.attach(3);
  MainServo.write(0);
  delay(3000);  //初始化时间，让舵机转到位
}
void MainServoSet(int Ang)
{
  int Value;
  Value = map(Ang,0,270,0,180);
  MainServo.write(Value);
  delay(100);
}
